<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        {{tgg}}
        <span v-show="flag">{{message}}</span>
        <span v-show="!flag">{{message2}}</span>
        <button @click="demo01()">切换</button>
    </div>
</body>

<script>
    new Vue({
        el:"#app",
        data:{
            message:"hello",
            message2:"world",
            flag:true
        },

        methods:{
            demo01(){
                this.flag=!this.flag;
            }
        }
    })
</script>
</html>